/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dog.model;

import java.io.Serializable;

/**
 * User: Kuttubek Aidaraliev
 * Date: 02.04.2010
 * Time: 08:52:04
 */


public class BaseEntity implements Serializable {

    private Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BaseEntity that = (BaseEntity) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }
}
